<template>
    <div style="background-color: darksalmon;">
        <button @click="show=true">1.听你爹我说了什么</button>
        <p v-show="show">老爸说（将要接受父组件传递过来的数据）：{{ toSon }}</p>
        <p v-show="show">用行动告诉你爹
            <button @click="handle()">反馈</button>
        </p>
        <button @click="show1=true">2.听听你爹我还说了啥</button>
        <br>
        你爹说<span :style="{fontSize:getWid}" v-show="show1">666</span>
        <hr>
        你爹还说{{ receiveMsg }}
    </div>
</template>

<script>
export default {
    props:['toSon','wid'],
    data() {
        return {
            show:false,
            score:90,
            show1:false,
            receiveMsg:''
        }
    },
    methods:{
        handle(){
            this.$emit('score',this.score)
        },
        receiveMessage(message){
            this,this.receiveMsg = message 
        }
    },computed:{
        getWid(){
            return this.wid+'px'
        }
    }
}
</script>